package com.bus.boot.dao.assist.impl;

import org.springframework.stereotype.Repository;

import com.bus.boot.dao.assist.BusGuestbookExtDao;
import com.bus.boot.entity.assist.BusGuestbookExt;
import com.bus.common.hibernate4.Updater;
import com.bus.common.jpa.JpaBaseDao;

@Repository
public class BusGuestbookExtDaoImpl extends
		JpaBaseDao<BusGuestbookExt, Integer> implements
		BusGuestbookExtDao {

	public BusGuestbookExt findById(Integer id) {
		BusGuestbookExt entity = get(id);
		return entity;
	}

	public BusGuestbookExt save(BusGuestbookExt bean) {
		getEntityManager().persist(bean);
		return bean;
	}

	public BusGuestbookExt deleteById(Integer id) {
		BusGuestbookExt entity = super.get(id);
		if (entity != null) {
			getEntityManager().remove(entity);
		}
		return entity;
	}

	@Override
	protected Class<BusGuestbookExt> getEntityClass() {
		return BusGuestbookExt.class;
	}

	@Override
	public BusGuestbookExt updateByUpdater(Updater<BusGuestbookExt> updater) {
		// TODO Auto-generated method stub
		return null;
	}
}